package com.hongdee.scm.inputinvoice.service;

import com.hongdee.scm.inputinvoice.entity.TScmInputInvoice;
import com.hongdee.scm.inputinvoice.entity.TScmInvoiceDetail;

import java.util.List;
import java.util.Map;

/**
 * Created by Mr. Xu on 2017/5/12.
 */
public interface ITScmInvoiceService  {
    /**
     * 发票分页
     * @param uid
     * @param start
     * @param limit
     * @param data
     * @return
     * @throws Exception
     */
    public Map page(String uid, String start, String limit, Map data) throws Exception;

    //    /**
//     * 发票明细
//     * @param id
//     * @return
//     * @throws Exception
//     */
    // public List listDetail(String id) throws Exception;

    /**
     * 发票明细
     * @param id
     * @return
     * @throws Exception
     */

    public Map pageDetail(String id, String start, String limit,String vin) throws Exception;


    /**
     * 发票保存
     * @param data
     * @param uid
     * @throws Exception
     */
    public void saveorupdate (TScmInputInvoice data, String type,String uid) throws Exception;
    /**
     * 发票明细保存
     * @param data
     * @param uid
     * @throws Exception
     */
    public void saveorupdateDetail(List<Map> data, String uid,String id) throws Exception;
    /**
     * 修改车辆价格
     * @param vins
     * @param price
     * @throws Exception
     */
    public Map updatePrice(String[] vins,String iid,String price,String uid) throws Exception;
    /**
     * 删除车辆明细
     * @param ids
     * @throws Exception
     */
    public Map  delInvoiceDetail (String[] ids,String iid,String uid) throws Exception;
    /**
     * 发票明细保存
     *
     * @param data
     * @param uid
     * @throws Exception
     */
    public Map saveorupdateInvoiceDetail(List<TScmInvoiceDetail> data, String uid, String id) throws Exception;
    /**
     * 红冲发票删除车辆
     *
     * @param ids
     * @param uid
     * @throws Exception
     */
    public void deleteCar(String[] ids, String uid) throws Exception;/**
     * 查询历史发票价格调整明细
     *
     * @param data
     * @param start
     * @param limit
     * @param uid
     * @return
     * @throws Exception
     */
    public Map historyPage(Map data, String start, String limit, String uid) throws Exception;


    /**
     * 查询发票流水号
     * @return
     * @throws Exception
     */
    public String invoiceSerialNumber () throws Exception;
    /**
     * 是否存在整冲红票
     * @param invoiceNum
     * @return
     * @throws Exception
     */
    public boolean existRedInvoice(String invoiceNum) throws Exception;

    /**
     * 查询历史发票金额和目前发票金额
     * @param vin
     * @return
     * @throws Exception
     */
    public Map historyInvoicePrice(String vin) throws Exception;


    public Map getCarCount(String id) throws Exception;

    public Map infoInvoice(String id,String uid) throws Exception;

}
